<div class="col-md-12" style="margin-top: 10px">
  <div class="panel panel-default">
    <div class="panel-heading">快照查询</div>
    <div class="panel-body">
      <div class="bjui-searchBar" id="snapshot_searcher">
          <label>集群名称:</label>
          <select name="cluster_name" data-toggle="selectpicker">
          {% for cluster in clusters %}
          <option value="{{ cluster.cluster_name }}">{{ cluster.cluster_name }}</option>
          {% end %}
          </select>
          &nbsp;
          <label>节点路径:</label>
          <input class="form-control" type="text" name="path" value="" placeholder="查询节点路径" size="25">
          &nbsp;
          <button type="submit" id="snapshot_lookup_btn" data-loading-mask="true" class="btn btn-default" data-icon="search">查询</button>&nbsp;
      </div>
    </div>
  </div>
</div>
<script>
$("#snapshot_lookup_btn").on("click", function(event){
    var cluster, path;
    cluster = $("#snapshot_searcher select[name='cluster_name']").val();
    path = $("#snapshot_searcher input[name='path']").val() || "/";
    $(this).navtab({
        url: "config/snapshot/displaytree",
        id: "display_snapshot_ztree",
        fresh: true,
        title: "快照信息",
        loadingmask: true,
        data: {cluster_name: cluster, path: path, _xsrf:$.cookie("_xsrf")},
    });
});
</script>
